package GoogleHandler;

public class G2Main
{
    public static void main(final String[] args)
    {
        final GoogleEx2 g = new GoogleEx2();

        if (!g.authenticate(g.username, g.password))
        {
            System.out.println("ERROR AUTH");
        }

        //        QUERY BY TIME RANGE

        //        final int numOfResults = g.doQueryByTimeRange("2012-03-17T03:00:00-00:00", "2012-03-17T20:00:00-00:00", g.feedAdress,
        //                g.username, g.password);
        //
        //        for (int i = 0; i < numOfResults; i++)
        //        {
        //            g.getQueryResults(i);
        //        }

        //      QUERY BY EVENT TITLE

        //        final int numOfResults = g.doQueryByTitle("orgia", g.feedAdress, g.username, g.password);
        //
        //        for (int i = 0; i < numOfResults; i++)
        //        {
        //            g.getQueryResults(i);
        //        }

        // ADDING EVENT TO CALENDAR
        g.setEvent(g.feedAdress, "Progetto", "Si studia", "Casa di Ciccio", "2012-03-18T03:00:00-00:00",
                "2012-03-18T20:00:00-00:00");
    }
}
